package com.yunji.aggregate.model.dto.analysis;

import com.google.common.collect.Sets;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.util.CollectionUtils;

import java.util.Set;

@Data
public class StaffDataStatsParam extends StatisticsCommonParam{

    @ApiModelProperty("代理商ID")
    private Long agentId;
    @ApiModelProperty("网点ID")
    private Long siteId;
    @ApiModelProperty("点位名称")
    private String locationName;
    @ApiModelProperty("员工姓名")
    private String staffName;

    @Override
    public Set<String> getOrderFields() {
        if (CollectionUtils.isEmpty(super.getOrderFields())){
            super.setOrderDesc(true);
            super.setOrderFields(Sets.newHashSet("cargoNums"));
        }
        return super.getOrderFields();
    }
}
